package com.suixun.service;

import java.text.ParseException;
import java.util.*;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.suixun.entity.*;
import com.suixun.entity.ext.ExtStdObjectinfo;
import com.suixun.entity.ext.ExtStdPeopleObjectinfo;
import com.suixun.entity.ext.FullObjectinfo;
import com.suixun.entity.page.ExMapRegionPage;
import com.suixun.service.BaseService;
import com.suixun.util.BeanConverterException;

public interface ObjectService extends BaseService {

	public Map getNoActiveObjectinfo(Integer peopleid);

	public Map getNoActiveObjectinfo(Integer peopleid, Integer deviceid);

	public Boolean saveFamilystatus(Integer peopleid, Integer objectid, String familystatus);

	public Integer saveFamilystatusForLogon(Integer peopleid, Integer deviceid, String familystatus);

	public MapRegionWithBLOBs saveSafeRegion(Integer peopleid, Integer objectid, Integer centerlng, Integer centerlat,
			Integer radius, String name, String address);

	public Boolean deleteSafeRegions(Integer peopleid, Integer objectid, String regionids);

	public ExMapRegionPage getSafeRegionsPaged(Integer peopleid, Integer objectid, Integer pageIndex, Integer pageSize);

	public MapRegion getSafeRegion(Integer peopleid, Integer objectid, Integer regionid);

	public FullObjectinfo getBabyInfo(Integer peopleid, Integer babyid);

	public List<ExtStdPeopleObjectinfo> getGuardians(Integer peopleid, Integer babyid);

	public Integer cancelBaby2(Integer peopleid, Integer babyid, Integer guardianid);

	public Integer cancelBaby2(Integer peopleid, Integer babyid);

	public ExtStdPeopleObjectinfo getGuardian(Integer peopleid, Integer babyid, Integer guardianid);

	public Boolean cancelBaby(Integer peopleid, Integer babyid);

	public MapRegionWithBLOBs setSafeRegion(Integer peopleid, Integer objectid, Integer regionid, Integer centerlng,
			Integer centerlat, Integer radius, String name, String address);

	/*
	 * public Map<Integer,List<ClassSilent>> getClassSilents(Integer
	 * peopleid,Integer objectid);
	 * 
	 * public Boolean saveClassSilent(Integer peopleid,Integer
	 * objectid,Map<Integer,List<ClassSilent>> list);
	 */

	/**
	 * 保存 设备 课堂静音设置
	 * 
	 * @param deviceInfo
	 * @return
	 */
	public Boolean saveClassSilentInfo(Integer peopleid, Integer objectid, String starttimeAM, String endtimeAM,
			String starttimePM, String endtimePM, String opencycle, String mdtid)
			throws ParseException, JsonProcessingException;

	/**
	 * 根据 宝贝id根家长id 获取课堂静音设置详情
	 * 
	 * @param userid
	 * @param babyid
	 * @return
	 */
	public List<Classsilenttimes> getClassSilentInfo(Integer userid, Integer babyid);

	public List<Alarmclocktimes> getAlarmclocks(Integer peopleid, Integer objectid);

	public Boolean saveAlarmclock(Integer peopleid, Integer objectid, Integer alarmid, String alarmtime, Integer mode,
			String alarmname, String opencycle) throws Exception;

	public Boolean deleteAlarmClocks(Integer peopleid, Integer objectid, String alarmids);

	public Boolean syncAlarmClocks(Integer peopleid, Integer objectid);

	public List<Classattendances> getAttendances(Integer peopleid, Integer objectid);

	public Boolean saveAttendance(Integer peopleid, Integer objectid, Integer alarmid, String alarmtime, Integer type,
			Boolean isclose) throws Exception;

	public Boolean deleteAttendances(Integer peopleid, Integer objectid, String alarmids);

	public List<Logattendances> getAttendanceLogs(Integer peopleid, Integer objectid, Date starttime, Date endtime);

	public String getGuardians(String mdtid);

	List<ExtStdObjectinfo> getBabys(Integer peopleid, Integer peopletype);

	StdSimidauth getSimidAuthBySimid(String simid);
}
